import request from '@/utils/request'

// 客户管理-分页列表查询
export function customeList(query) {
    return request({
        url: `/system/customerarchives/list`,
        method: 'get',
        params: query
    })
}
//绑定表计的客户列表
export function customerBindingMeterList(query) {
  return request({
    url: `/system/customerarchives/selectCustomerBindingMeterList`,
    method: 'get',
    params: query
  })
}

// 客户管理-分页列表查询-加状态
export function customeStatusList(query) {
    return request({
        url: `/system/customerarchives/listByType`,
        method: 'get',
        params: query
    })
}

// 客户管理-获取详细信息
export function customeInfo(id) {
    return request({
        url: `/system/customerarchives/${id}`,
        method: 'get',
    })
}

// 客户管理-添加
export function addCustome(data) {
    return request({
        url: '/system/customerarchives',
        method: 'post',
        data: data
    })
}

// 客户管理-修改
export function updateArea(data) {
    return request({
        url: '/system/customerarchives',
        method: 'put',
        data: data
    })
}

// 删除参数配置
export function delCustome(configId) {
    return request({
        url: '/system/customerarchives/' + configId,
        method: 'delete'
    })
}

// 客户管理-导出
export function exportCustome(data) {
    return request({
        url: '/system/customerarchives/export',
        method: 'post',
        data: data
    })
}

// 指令发送记录-列表
export function instructList(query) {
    return request({
        url: `/system/instructLog/list`,
        method: 'get',
        params: query
    })
}

// 客户编号生成
export function generateNumber(query) {
    return request({
        url: `/system/createOrderNo/${query}`,
        method: 'get',
    })
}
// 报停
export function stopCustome(data) {
    return request({
        url: '/system/maintenancerecord/stop',
        method: 'post',
        data: data
    })
}
// 拆表
export function dismantleCustome(data) {
    return request({
        url: '/system/maintenancerecord/dismantle',
        method: 'post',
        data: data
    })
}
// 销户
export function cancelCustome(data) {
    return request({
        url: '/system/maintenancerecord/cancel',
        method: 'post',
        data: data
    })
}
// 加入黑名单
export function addBlckCustome(data) {
    return request({
        url: '/system/maintenancerecord/addBlck',
        method: 'post',
        data: data
    })
}
// 移除黑名单
export function rmBlckCustome(data) {
    return request({
        url: '/system/maintenancerecord/rmBlck',
        method: 'post',
        data: data
    })
}